package com.msw.jcwapi.dx.dxrm.controller;


import com.msw.jcwapi.common.result.Result;
import com.msw.jcwapi.dx.dxrm.entity.Dxrm;
import com.msw.jcwapi.dx.dxrm.service.IDxrmService;
import com.msw.jcwapi.wb.wbrm.entity.Wbstruct;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author author
 * @since 2025-04-28
 */
@RestController
@RequestMapping("/dxrm")
public class DxrmController {

    @Autowired
    private IDxrmService dxrmService;

    //    查询全部
    @GetMapping("/list")
    public Result list() {
        return Result.ok(dxrmService.list());
    }

    //编辑(通过rmid编辑)
    @PutMapping
    public Result update(@RequestBody Dxrm dxrm){
        return  Result.ok(dxrmService.update(dxrm));
    }

}
